/**
 * 
 */
package com.wgo.precise.wiring.common;

import java.util.HashSet;
import java.util.Set;

import remato.domain.common.RequirementSystem;

import com.wgo.bpot.server.persist.Persistent;
import com.wgo.bpot.wiring.common.DomainModelConventionImpl;

/**
 * @author PEide3
 */
public class PreciseDomainModelConvention extends DomainModelConventionImpl<Persistent> {

	private Set<Class<? extends Persistent>> rootConceptClasses ; 
	
	@SuppressWarnings("unchecked")
	public PreciseDomainModelConvention(){
		super();
		rootConceptClasses = new HashSet<Class<? extends Persistent>>();
		rootConceptClasses.add(RequirementSystem.class);
		Class<? extends Persistent> optionalRootSystemType = null;
		try {
			optionalRootSystemType = (Class<? extends Persistent>) Class.forName(RequirementSystem.class.getPackage().getName() + "." + "UseCaseSystem");
			rootConceptClasses.add(optionalRootSystemType);
		} catch (ClassNotFoundException e) { /* ignore exception */ }
	}
	public Class<Persistent> getDomainModelInterface() {
		return Persistent.class;
	}

	public Set<Class<? extends Persistent>> getRootConceptClasses() {
		return new HashSet<Class<? extends Persistent>>(rootConceptClasses);
	}

//	public boolean addRootConceptClass(Class<? extends Persistent> rootConceptType) {
//		return rootConceptClasses.add(rootConceptType);
//	}
//
//	public boolean removeRootConceptClass(Class<? extends Persistent> rootConceptType) {
//		return rootConceptClasses.remove(rootConceptType);
//	}
}
